package com.smallkk.girl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created By  醉美柳舞之众星捧月
 *
 * @author song
 * @date 2017/12/2 1:49
 */
@Service
public class GirlService {
    @Autowired
    private GirlRepository girlRepository;

    @Transactional()
    public void inserTwo() {
        Girl girlA = new Girl();
        girlA.setCupSize("A");
        girlA.setAge(18);
        girlRepository.save(girlA);

        Girl girlB = new Girl();
        girlB.setAge(19);
        girlB.setCupSize("D");
        girlRepository.save(girlB);
    }
}
